package liumengbaio.lolzhangyoubao.Activity.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

import java.util.List;

import liumengbaio.lolzhangyoubao.Activity.Adapter.MoreWallpaperPicAdapter;
import liumengbaio.lolzhangyoubao.Activity.InFo.MoreWallpaperInfo;
import liumengbaio.lolzhangyoubao.R;

/**
 * Created by lanouhn on 16/9/13.
 */
public class MoreWallpaperPicActivity extends AppCompatActivity {

    private ViewPager mViewPager;
    private MoreWallpaperPicAdapter adapter;
    private List<MoreWallpaperInfo.DataBean> dataBeen;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.more_wallpaper_pic);
        initView();
        initData();
    }

    private void initView() {
        mViewPager = (ViewPager) findViewById(R.id.more_wallpaper_viewPager);
    }

    private void initData() {
        Intent intent = getIntent();
        dataBeen = (List<MoreWallpaperInfo.DataBean>) intent.getSerializableExtra("thumb_url");
        adapter = new MoreWallpaperPicAdapter( MoreWallpaperPicActivity.this,dataBeen);
        mViewPager.setAdapter(adapter);
    }
}
